package ua.com.alus.resvac.crm.domen.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * Created by Usatov Alexey
 */
@Entity
@Table(name = "CITY")
@NamedQueries({
        @NamedQuery(name = City.SELECT_CITY_BY_REGION_ID, query = "select c from City c where regionId=:regionId")
})
public class City {

    public static final String SELECT_CITY_BY_REGION_ID = "ua.com.alus.resvac.crm.domen.entities.City.selectByRegionId";

    @Id
    @Column(name = "ID")
    private Integer id;

    @Column(name = "REGION_ID")
    private Integer regionId;

    @Column(name = "NAME")
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getRegionId() {
        return regionId;
    }

    public void setRegionId(Integer regionId) {
        this.regionId = regionId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
}
